package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName ums_teacher
 */
@TableName(value ="ums_teacher")
@Data
public class UmsTeacher implements Serializable {
    /**
     * 教师信息自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer teacherId;

    /**
     * 教职工编号，由所在学院编号（2位）+数字3位组成
     */
    private String teacherNo;

    /**
     * 教职工姓名
     */
    private String teacherName;

    /**
     * 教职工性别
     */
    private String teacherSex;

    /**
     * 教职工出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date teacherBirthday;

    /**
     * 教职工入校日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date teacherCreatetime;

    /**
     * 教职工电话
     */
    private String teacherTel;

    /**
     * 教职工家庭地址
     */
    private String teacherAddress;

    /**
     * 教职工办公地址
     */
    private String teacherOffoaddress;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsTeacher other = (UmsTeacher) that;
        return (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
            && (this.getTeacherNo() == null ? other.getTeacherNo() == null : this.getTeacherNo().equals(other.getTeacherNo()))
            && (this.getTeacherName() == null ? other.getTeacherName() == null : this.getTeacherName().equals(other.getTeacherName()))
            && (this.getTeacherSex() == null ? other.getTeacherSex() == null : this.getTeacherSex().equals(other.getTeacherSex()))
            && (this.getTeacherBirthday() == null ? other.getTeacherBirthday() == null : this.getTeacherBirthday().equals(other.getTeacherBirthday()))
            && (this.getTeacherCreatetime() == null ? other.getTeacherCreatetime() == null : this.getTeacherCreatetime().equals(other.getTeacherCreatetime()))
            && (this.getTeacherTel() == null ? other.getTeacherTel() == null : this.getTeacherTel().equals(other.getTeacherTel()))
            && (this.getTeacherAddress() == null ? other.getTeacherAddress() == null : this.getTeacherAddress().equals(other.getTeacherAddress()))
            && (this.getTeacherOffoaddress() == null ? other.getTeacherOffoaddress() == null : this.getTeacherOffoaddress().equals(other.getTeacherOffoaddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getTeacherNo() == null) ? 0 : getTeacherNo().hashCode());
        result = prime * result + ((getTeacherName() == null) ? 0 : getTeacherName().hashCode());
        result = prime * result + ((getTeacherSex() == null) ? 0 : getTeacherSex().hashCode());
        result = prime * result + ((getTeacherBirthday() == null) ? 0 : getTeacherBirthday().hashCode());
        result = prime * result + ((getTeacherCreatetime() == null) ? 0 : getTeacherCreatetime().hashCode());
        result = prime * result + ((getTeacherTel() == null) ? 0 : getTeacherTel().hashCode());
        result = prime * result + ((getTeacherAddress() == null) ? 0 : getTeacherAddress().hashCode());
        result = prime * result + ((getTeacherOffoaddress() == null) ? 0 : getTeacherOffoaddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", teacherId=").append(teacherId);
        sb.append(", teacherNo=").append(teacherNo);
        sb.append(", teacherName=").append(teacherName);
        sb.append(", teacherSex=").append(teacherSex);
        sb.append(", teacherBirthday=").append(teacherBirthday);
        sb.append(", teacherCreatetime=").append(teacherCreatetime);
        sb.append(", teacherTel=").append(teacherTel);
        sb.append(", teacherAddress=").append(teacherAddress);
        sb.append(", teacherOffoaddress=").append(teacherOffoaddress);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}